Changing CUSTOMGUI_RANGE
-
I am nearly done with my command data plugin but I have one final issue.
I have a RangeData Slider and I want to adjust the interface. In the .res file the only CUSTOMGUI function that is recognized is: ANIM OFF and RANGE_CURSORICON (that I can figure out)
However I need to customize the RangeData with RANGE_ALLOWRANGEEDIT and RANGE_ALLOWRANGESLELECION. See this link for the RANGE_CUSTOMGUI options available.Can I update RANGE_ALLOWRANGESELECTION and other custom gui's in my .res file or can I do this in my .pyp file?
I am using R19
Thank you for any help. -
Hi gsmetzer, thanks for reaching out us.
With regard to your issue, I think there are no limitation in setting updating RANGE_ALLOWRANGESLELECION in the .res or via the plugin.
On the other side please be aware that due to some mispell you have to set RANGE_ALLOWRANGESLELECION and not RANGE_ALLOWRANGESELECTION and also, due to an issue in our documentation, ALLOWRANGEEDIT and not **RANGE_**ALLOWRANGEEDIT.You can see all the parameter IDs for the Range slider, creating "Range Slider" a UserData in Cinema 4D and switch to the Details tab to see the different IDs.
UPDATE: image has been corrected to reflect the purpose of showing the difference params.
Best, Riccardo
-
Thanks for the info. I'm using R19 and haven't tested on newer releases so its possible .res access to CUSTOMGUI wasn't available in R19 for RangeData...
If I can change the CUSTOMGUI's in my python file how do I do that? I have been searching around trying to find some sort of code but coming up empty handed. Handling Description ID's is pretty simple for UserData but not for an ObjectData plugin. Any code or tutorials on how I can customize my gui from my python file in my ObjectData plugin?
Thank You, -
Hi,
I am not quite clear, on what you are actually trying to do.
- If you just want to set the gui type for an element statically, you have to set the
CUSTOMGUI
flag in your description resource file for that element. See the description resource manual for details. - If you want to modify the description of your object dynamically, you will have to overwrite
NodeData.GetDDescription()
. There is an example in Python SDK examples on how to do that in detail.
Cheers
zipit - If you just want to set the gui type for an element statically, you have to set the
-
Hi gsmetzer,
with regard the use of the range slide in a resource file please have a look at
<Cinema 4D folder>/resource/modules/olod.res
: the LOD_BAR parameter is a range sliderWith regard to using the
NodeData::GetDDescription()
please check:- py-dynamic_parameters_object_r18.pyp
- py-preference_r19.pyp
- py-spherify_modifier_r13.pyp
Best, Riccardo