forked from blender/blender
Fix review comments #51
@ -241,9 +241,9 @@ void BlenderSceneDelegate::set_setting(const std::string &key, const pxr::VtValu
|
||||
pxr::SdfPath BlenderSceneDelegate::prim_id(ID *id, const char *prefix) const
|
||||
{
|
||||
/* Making id of object in form like <prefix>_<pointer in 16 hex digits format> */
|
||||
char str[32];
|
||||
snprintf(str, 32, "%s_%016llx", prefix, (uintptr_t)id);
|
||||
return GetDelegateID().AppendElementString(str);
|
||||
char name[32];
|
||||
snprintf(name, sizeof(name), "%s_%016llx", prefix, (uintptr_t)id);
|
||||
return GetDelegateID().AppendElementString(name);
|
||||
}
|
||||
|
||||
pxr::SdfPath BlenderSceneDelegate::object_prim_id(Object *object) const
|
||||
|
@ -184,6 +184,7 @@ void CurvesData::write_material()
|
||||
{
|
||||
Object *object = (Object *)id;
|
||||
Material *mat = nullptr;
|
||||
/* TODO: Using only first material. Add support for multimaterial. */
|
||||
if (BKE_object_material_count_eval(object) > 0) {
|
||||
DagerD marked this conversation as resolved
Outdated
|
||||
mat = BKE_object_material_get_eval(object, 0);
|
||||
}
|
||||
|
@ -319,15 +319,15 @@ bool InstancerData::is_instance_visible(Object *object)
|
||||
pxr::SdfPath InstancerData::object_prim_id(Object *object) const
|
||||
{
|
||||
/* Making id of object in form like <prefix>_<pointer in 16 hex digits format> */
|
||||
char str[32];
|
||||
snprintf(str, 32, "O_%016llx", (uint64_t)object);
|
||||
return prim_id.AppendElementString(str);
|
||||
char name[32];
|
||||
snprintf(name, sizeof(name), "O_%016llx", (uint64_t)object);
|
||||
return prim_id.AppendElementString(name);
|
||||
}
|
||||
|
||||
pxr::SdfPath InstancerData::light_prim_id(LightInstance const &inst, int index) const
|
||||
{
|
||||
char name[16];
|
||||
snprintf(name, 16, "L_%08x", index);
|
||||
snprintf(name, sizeof(name), "L_%08x", index);
|
||||
return inst.data->prim_id.AppendElementString(name);
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,7 @@ pxr::SdfPathVector MeshData::submesh_paths() const
|
||||
pxr::SdfPath MeshData::submesh_prim_id(int index) const
|
||||
{
|
||||
char name[16];
|
||||
snprintf(name, 16, "SM_%04x", index);
|
||||
snprintf(name, sizeof(name), "SM_%04x", index);
|
||||
return prim_id.AppendElementString(name);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user
Add comment here about using first material and TODO about support multimaterial