split from this thread
split from this thread
I made some unsuccessful researches about how to access to the selected value of a CUSTOMGUI QUICKTABRADIO declared in a Resource File. I found some examples on how to create and use a QuickTab using GeDialog, but none using .RES.
@ferdinand, based on the ID_CA_MUSCLE_OBJECT_STATE you wrote above, how do you access to the LONG ID_CA_MUSCLE_OBJECT_STATE value inside the Execute() or Message()? I didn't fount any way to get the right message update when clicking the options on the Cycle.
Until now I totally failed to get the selected value from it, I only get 0 when the first element of the cycle is clicked and nothing on the others.
Any clue or example would be more than welcome!
Thanks a lot
thank you for reaching out to us. I have forked your question from How to Highlight a Button since it is a new question which does constitute a new topic. I am also currently on vacation which means that you will have to address the rest of the team to get support in a timely fashion (addressing just me and hiding your question in an older topic was probably what got your question being overlooked).
About your question(s):
Message(self, node, mid, mdata):
"""Polls a quicktab gadget for the hypothetical muscle object case.
node (c4d.BaseList2D): The node to which the message has been sent.
mid (int): The message id.
mdata (any): The message data. In case of description messages usually
a `dict` in Python.
# The conditioning to a specific message/event type is optional, but
# should be in your case probably MSG_DESCRIPTION_POSTSETPARAMETER.
if mid == c4d.MSG_DESCRIPTION_POSTSETPARAMETER:
# Unpack from which element the message has been sent.
eid = mdata["descid"].id
# This has been sent by the quicktab gadget.
if eid == c4d.ID_CA_MUSCLE_OBJECT_STATE:
# Get the node state of the parameter which has that quicktab GUI
# and do different things based on the state.
state = node[c4d.ID_CA_MUSCLE_OBJECT_STATE]
if state == c4d.ID_CA_MUSCLE_OBJECT_STATE_RELAX:
elif state == c4d.ID_CA_MUSCLE_OBJECT_STATE_COMPRESSED:
For a more precise answer you should post code or a more precise description of what you are trying to do. And you should also address the rest of the team since I am still going to be on vacation for a few days.