Lasso Selection Tool MDATA_SELECTION_VISIBLE Setting Doesn't Work
-
Hello, i'm trying to make a popup menu with selection modes and for some reason lasso selection Visible option which is set by MDATA_SELECTION_VISIBLE isn't working. Live and Rectangle Selection are working fine...
Cinema 4D R26.
from typing import Optional import c4d from c4d import gui def tool(): return doc.GetActiveToolData() def main() -> None: # Set IDs ID_LIVE_SELECTION = c4d.FIRST_POPUP_ID ID_LIVE_SELECTION_THROUGH = c4d.FIRST_POPUP_ID + 1 ID_LASSO_SELECTION = c4d.FIRST_POPUP_ID + 2 ID_LASSO_SELECTION_THROUGH = c4d.FIRST_POPUP_ID + 3 ID_RECTANGLE_SELECTION = c4d.FIRST_POPUP_ID + 4 ID_RECTANGLE_SELECTION_THROUGH = c4d.FIRST_POPUP_ID + 5 # Create container for Popup popup = c4d.BaseContainer() popup.SetString(ID_LIVE_SELECTION, "Live Selection") popup.SetString(ID_LIVE_SELECTION_THROUGH, "Live Selection Through") popup.SetString(ID_LASSO_SELECTION, "Lasso Selection") popup.SetString(ID_LASSO_SELECTION_THROUGH, "Lasso Selection Through") popup.SetString(ID_RECTANGLE_SELECTION, "Rectangle Selection") popup.SetString(ID_RECTANGLE_SELECTION_THROUGH, "Rectangle Selection Through") # Display Popup result = gui.ShowPopupDialog(cd=None, bc=popup, x=c4d.MOUSEPOS, y=c4d.MOUSEPOS) print("result: %s" % result) # Process if result == ID_LIVE_SELECTION: c4d.CallCommand(200000083) # Live Selection tool()[c4d.MDATA_SELECTLIVE_VISIBLE] = True tool()[c4d.MDATA_SELECTLIVE_RADIUS] = 3 elif result == ID_LIVE_SELECTION_THROUGH: c4d.CallCommand(200000083) # Live Selection tool()[c4d.MDATA_SELECTLIVE_VISIBLE] = False tool()[c4d.MDATA_SELECTLIVE_RADIUS] = 3 elif result == ID_LASSO_SELECTION: c4d.CallCommand(200000085) # Lasso Selection tool()[c4d.MDATA_SELECTION_VISIBLE] = True elif result == ID_LASSO_SELECTION_THROUGH: c4d.CallCommand(200000085) # Lasso Selection tool()[c4d.MDATA_SELECTION_VISIBLE] = False elif result == ID_RECTANGLE_SELECTION: c4d.CallCommand(200000084) # Rectangle Selection tool()[c4d.MDATA_SELECTION_VISIBLE] = True elif result == ID_RECTANGLE_SELECTION_THROUGH: c4d.CallCommand(200000084) # Rectangle Selection tool()[c4d.MDATA_SELECTION_VISIBLE] = False c4d.EventAdd() """ def state(): # Defines the state of the command in a menu. Similar to CommandData.GetState. return c4d.CMD_ENABLED """ if __name__ == '__main__': main()
-
Hi @Gaal-Dornik ,
Thanks for reaching out to us. Please excuse the delay.
This issue is now tracked via internal bug tracking system. Thread is tagged to_fix, so that the thread can be tracked more closely.
Cheers,
Ilia -