ruschelp / cortex-vfx

Automatically exported from code.google.com/p/cortex-vfx
Other
3 stars 1 forks source link

IECoreHoudini.FnProceduralHolder.setParameterised() doesn't update the category, class and version menu. #41

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If you set the procedural on an ieProceduralHolder node in Houdini using the 
IECoreHoudini.FnParameterisedHolder function set it doesn't update the menu 
selection correctly... but the rest of the parameter interface is fine.

>>> n = hou.obj("/obj/geo1").createNode( "ieProceduralHolder" )
>>> fn = IECoreHoudini.FnProceduralHolder( n )
>>> cl = IECore.ClassLoader.defaultProceduralLoader().load( "sphereProcedural" 
)()
>>> fn.setParameterised( cl )

A hacky workaround is to then set the class and version explicitly...

>>> n.parm("__className").set( cl.path )
>>> n.parm("__classVersion").set( str( cl.version ) )

Original issue reported on code.google.com by danbeth...@gmail.com on 13 Apr 2011 at 7:15

GoogleCodeExporter commented 9 years ago
This is actually the expected behaviour. If you call setParameterised directly 
from an instance of a class, there isn't an associated className and 
classVersion. You can instead use

>>> fn.setProcedural( "sphereProcedural" )

and the menus should update appropriately. IECoreMaya has the same behaviour 
(though no className menu to make it as obvious).

Original comment by andrewk....@gmail.com on 13 Apr 2011 at 4:23

GoogleCodeExporter commented 9 years ago
Ah ok, that makes sense. Thanks for the info!

Original comment by danbeth...@gmail.com on 14 Apr 2011 at 3:17

GoogleCodeExporter commented 9 years ago

Original comment by danbeth...@gmail.com on 14 Apr 2011 at 3:17