Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/05/2012 at 13:28, xxxxxxxx wrote:
Is there any way to script the equivalent of right-clicking and choosing "Reset to Default"?
I am trying to come up with a script that displays properties that have changed from their default values.
"IsDirty()" does not work for my purposes. I would rather have "InitSettings()", "GetDefault()", "IsDefault()", "ResetToDefault()" or something of that nature.
Thanks.
On 22/05/2012 at 06:46, xxxxxxxx wrote:
It is not possible to access the parameters description container of a node. But we can access the one of a user data. For example here is how to reset all float user data of an object:
import c4d for id, bc in op.GetUserDataContainer() : # Loop through each user data if bc.GetId()==c4d.DTYPE_REAL: # Test if it's a float user data op[id] = bc.GetReal(c4d.DESC_DEFAULT) # Reset value to its default c4d.EventAdd() # Tells CINEMA that scene data was changed
On 22/05/2012 at 11:28, xxxxxxxx wrote:
Good to know. Thanks.