Fix #144814: Cycles OSL crash accessing geom:name string attribute
This should be a ustring hash now, not a ustring. Pull Request: https://projects.blender.org/blender/blender/pulls/144881
This commit is contained in:
committed by
Brecht Van Lommel
parent
abe1b9d895
commit
1d9bd460fc
@@ -534,12 +534,12 @@ ccl_device_template_spec bool set_attribute(ustring str,
|
||||
if (type.basetype == TypeDesc::STRING && type.aggregate == TypeDesc::SCALAR &&
|
||||
type.arraylen == 0)
|
||||
{
|
||||
ustring *sval = (ustring *)val;
|
||||
OSLUStringHash *sval = (OSLUStringHash *)val;
|
||||
sval[0] = str;
|
||||
|
||||
if (derivatives) {
|
||||
sval[1] = OSLRenderServices::u_empty;
|
||||
sval[2] = OSLRenderServices::u_empty;
|
||||
sval[1] = OSLUStringHash();
|
||||
sval[2] = OSLUStringHash();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user