DzProperty.isSelected not work,can't find current selected Property

why the"DzProperty.isSelected"  not work,can't find current selected Property,alwasy retrun false!

Comments

  • SimonJMSimonJM Posts: 5,885

    An example of how you are using it might help those who know diagnose the issue

  • edited December 2021

    The code is very simple

    code removed

     

    I just don't know what is the Property selected status,I have tryed many times,just can't get a selected property.

     

     

    2021-12-27_202622.jpg
    638 x 243 - 26K
    Post edited by Richard Haseltine on
  • Richard HaseltineRichard Haseltine Posts: 81,591
    edited December 2021

    How about DzProperty.isSelected() - it's a method, not a value.

    Sorry, cross posted - where is getElementProperties coming from? It errors for me.

    Post edited by Richard Haseltine on
  • edited December 2021

    I'm sorry,below is the full code.

     

    code removed due to lack of proper license complianance

    Post edited by Richard Haseltine on
  • That looks to be http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/properties/node_properties/start , in whichc ase please edit to include the required CC by Attribution info.

    The forum does support code blocks, between the button for inserting a picture link and the button for inserting a table.

    I'm not quite sure if it is possible to set the seelcted state in advance from the UI - restring the commented out test on the name and adding this as the conditional code

     {	oProperty.setSelected( true );}

    causes the property name to be printed so it is working, but I can't trigger it be clicking on a slider in regular or edit mode.

  • yes,it can be triggered by use oProperty.setSelected( true ),but can't be  trigger by click on UI,is it a bug?

  • I have removed the code from your post as you have not made it cinform to the license terms.

    I don't know if it is a bug or if we are simply not understanding what selection is meant to refer to. You could open a ticket to ask for clarification.

  • Ok, thanks for help!

Sign In or Register to comment.