How if at all can you do this?
an example would be the k_volume daemon has a button to "fit to object"
but there doesent seem to be a way to script that since the connection to the "object" seems to
not be something we have access to?
any ideas or are we out of luck?
thanks
Johnc
scripting "fit to object" connection?
Re: scripting "fit to object" connection?
Hi Johnc,
for RealFlow objects there is a getBoundingBox() function that returns the minimum and maximum corner positions of the object bounding box.
From that point, making the k_volume (or whatever) transformation fit that box shouldn't be a big deal.
for RealFlow objects there is a getBoundingBox() function that returns the minimum and maximum corner positions of the object bounding box.
From that point, making the k_volume (or whatever) transformation fit that box shouldn't be a big deal.
Code: Select all
(mincorner,maxcorner) = Cube01.getBoundingBox()
obj_scale = (maxcorner-mincorner)
obj_center = Vector.new()
obj_center += obj_scale
obj_center.scale( .5 )
obj_center += mincorner
k_Volume01.setParameter( "Position", obj_center )
k_Volume01.setParameter( "Scale", obj_scale )
Alex Ribao
RealFlow Team
Next Limit Technologies
RealFlow Team
Next Limit Technologies