Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions defold-rive/src/comp_rive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,11 @@ namespace dmRive
}
}
}
return dmGameSystem::GetMaterialConstant(GetMaterial(component, component->m_Resource), params.m_PropertyId, params.m_Options.m_Index, out_value, false, CompRiveGetConstantCallback, component);

int32_t value_index = 0;
dmGameObject::GetPropertyOptionsIndex(params.m_Options, 0, &value_index);

return dmGameSystem::GetMaterialConstant(GetMaterial(component, component->m_Resource), params.m_PropertyId, value_index, out_value, false, CompRiveGetConstantCallback, component);
}

dmGameObject::PropertyResult CompRiveSetProperty(const dmGameObject::ComponentSetPropertyParams& params)
Expand Down Expand Up @@ -1269,7 +1273,9 @@ namespace dmRive
}
}
}
return dmGameSystem::SetMaterialConstant(GetMaterial(component, component->m_Resource), params.m_PropertyId, params.m_Value, params.m_Options.m_Index, CompRiveSetConstantCallback, component);
int32_t value_index = 0;
dmGameObject::GetPropertyOptionsIndex(params.m_Options, 0, &value_index);
return dmGameSystem::SetMaterialConstant(GetMaterial(component, component->m_Resource), params.m_PropertyId, params.m_Value, value_index, CompRiveSetConstantCallback, component);
}

static void ResourceReloadedCallback(const dmResource::ResourceReloadedParams* params)
Expand Down
2 changes: 1 addition & 1 deletion game.project
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies#0 = https://github.com/andsve/dirtylarry/archive/master.zip

[library]
include_dirs = defold-rive
defold_min_version = 1.12.0
defold_min_version = 1.12.2

[graphics]
max_draw_calls = 1024
Expand Down
Loading