Votes
0
Product:
iClone 7
Version:
7.41
Status:
Assigned
Issue 6006
object.WorldTransform() only works in main.py and not in modules
When trying to run:
box = RLPy.RScene.FindObject(RLPy.EObjectType_Prop, "Box")
box_wt = box.WorldTransform()
bt=box_wt.T()

All works well.

I can use a function for this as well in main.py:
def model_get_T_world(model):
wt=model.WorldTransform()
t_=wt.T()
return t_

box = RLPy.RScene.FindObject(RLPy.EObjectType_Prop, "Box")
bt=model_get_T_world(box)

All works well.

But if I try move the model_get_T_world function to an extension/module like:
import FUNC #Contain model_get_T_world
box = RLPy.RScene.FindObject(RLPy.EObjectType_Prop, "Box")
bt=FUNC.model_get_T_world(box)

The T vector get the wrong values.
OS: Windows 10
  •  1
  •  859
Submitted byThe-any-Key
1
COMMENTS (1)
The-any-Key
Adding some more info on this:
Video: https://youtu.be/gbT7vF8qsLI
Also added python files to test with.
1