Isotropix Forums

Creating properties on GeometryAbcMesh

Clarisse Scripting related topics

Creating properties on GeometryAbcMesh

Unread postby cleu » Sat May 22, 2021 2:03 am

Hello,

I am attempting to add a property to a GeometryAbcMesh, that I will then feed into an aovStore.
In my first attempt, I went through and added it as an attribute. I could see the attribute at the bottom of the attribute editor, but when using a texture extract property node, I was unable to get it render. Also, I did a cache where I wrote the metadata to an alembic cache via Maya, and then I was able to pick it up with the extract property just fine. When I select the alembic, I can see that the metadata is present in the Property Editor, whereas, if I just simple create the metadata as an attribute on the geo, it doesn't show up in the Property Editor. So I think I need to add the metadata as a Property.

So I had this script to try and create a property and add it to my mesh, but its not doing much so far.

Code: Select all
item = ix.get_item("/path/to/my/object_geoShape")

myArray = ix.api.CoreStringArray(1)
myArray[0] = "propTest"

item.get_module().register_properties(myArray)

prop = ix.api.ResourceProperty("propTest")
prop.init(ix.api.ResourceProperty.TYPE_INT_32, 100, 1)
prop.set_long(1,7)


I tried switching the order of registering the property vs creating it and that didn't do it either.
using clarisse 4.0
cleu
 
Posts: 3
Joined: Wed Sep 11, 2019 10:20 pm

Re: Creating properties on GeometryAbcMesh

Unread postby cleu » Thu May 27, 2021 1:46 am

talking to other people at my office and it sounds like creating properties via python is not really possible... so that might be the answer to this one
cleu
 
Posts: 3
Joined: Wed Sep 11, 2019 10:20 pm

Re: Creating properties on GeometryAbcMesh

Unread postby sam » Thu May 27, 2021 8:48 am

Well you can't add such property because Clarisse projects only store attribute override or full resources such as its particle container. Local geometry resource override is not possible because it would make the project file potentially fat (like does particles) because we took the decision to always dump it in human readable ASCII instead of binary.

These are some of the reasons why you can't manage shading group partitioning directly in Clarisse for example.

But all that isn't set to stone anyway.

The only thing you can do is create a custom attribute and attach it to the item. This will be stored as an override.
Sam Assadian
Isotropix
CEO/Founder
User avatar
sam
 
Posts: 1671
Joined: Fri Jan 25, 2013 11:33 pm

Re: Creating properties on GeometryAbcMesh

Unread postby cleu » Sat May 29, 2021 1:35 am

Hello,

Thank you for your response. I am not sure I quite understand fully the concepts of overrides you are talking about. But that's ok, I think I understand generally that in order for something to be a property is must be stored on the geo itself. Like you would have if you created an alembic cache with some extra attributes.

We talked it over and I think we are going to pivot to utilizing shading variables to drive our shader network.

thanks again
chris
cleu
 
Posts: 3
Joined: Wed Sep 11, 2019 10:20 pm


Return to Scripting