Profile Picture

Python Attribute error moving prop

Posted By terellrandolph 2 Years Ago
You don't have permission to rate!
Author
Message
terellrandolph
terellrandolph
Posted 2 Years Ago
View Quick Profile
New Member

New Member (47 reputation)New Member (47 reputation)New Member (47 reputation)New Member (47 reputation)New Member (47 reputation)New Member (47 reputation)New Member (47 reputation)New Member (47 reputation)New Member (47 reputation)

Group: Forum Members
Last Active: 2 Years Ago
Posts: 1, Visits: 54
Does anyone know why this line of code is giving me an error. It’s from the wiki page on how to move a prop

ts_data_block.SetData("Position/PositionX", RLPy.RTime(0), RLPy.RVariant(100))
philipjie117
philipjie117
Posted 2 Years Ago
View Quick Profile
New Member

New Member (97 reputation)New Member (97 reputation)New Member (97 reputation)New Member (97 reputation)New Member (97 reputation)New Member (97 reputation)New Member (97 reputation)New Member (97 reputation)New Member (97 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 6, Visits: 108
iClone 7 or iClone 8? What error it said?
mrtobycook
mrtobycook
Posted 2 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)

Group: Forum Members
Last Active: 9 Months Ago
Posts: 425, Visits: 2.7K
Probably because Time has changed so much in iClone 8. But I’d need to see more of the code.

The way that Time is explained in the documentation isn’t correct, to me anyway. I had to ignore the docs and write all my Time-related stuff blindly, because its so differently in iClone 8.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - 
https://forum.reallusion.com/uploads/images/d11fc97b-7387-4f19-bb1e-0785.png
virtualfilmer.com | youtube

mrtobycook
mrtobycook
Posted 2 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)Distinguished Member (2.8K reputation)

Group: Forum Members
Last Active: 9 Months Ago
Posts: 425, Visits: 2.7K
The explanation is probably here, although even the examples on this page don’t work:



https://tinyurl.com/yeypuehs






But anyway, I’m not at my pc and I’m not sure which iClone version you’re using. Bottom line, in iClone 7 time used to be this:

X = RLPy.RTime(0)

And now in iClone 8 it’s:

X = RLPy.RTime.FromValue(0)

Then you if you want to print that variable you made, in iClone 8 you’ll need to convert it to an integer like this:

print( X.ToInt() )

- - - - - - - - - - - - - - - - - - - - - - - - - - - - 
https://forum.reallusion.com/uploads/images/d11fc97b-7387-4f19-bb1e-0785.png
virtualfilmer.com | youtube




Reading This Topic