Creating Attribute manager controls



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 25/05/2011 at 16:49, xxxxxxxx wrote:

    LOL. Whatever it takes.
    You don't want to know what goes through my head in order for me to use pointers in C++ 😉

    The main reason I was curious about it is because your code doesn't work when I try to use it on something other than a button. Like say a checkbox for example.
    I thought that maybe the "if type<>18: " meant "if the type is a button".
    So I was curious if there were other numbers that would allow things like checkboxes to work in a similar manner.

    I guess I'll have to try them out too. And see if anything happens.

    Thanks for the information.
    -ScottA



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 25/05/2011 at 21:58, xxxxxxxx wrote:

    Your ID is not wokring because of the missing prefix. ;)

    c4d.CLICK_ME



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 26/05/2011 at 02:20, xxxxxxxx wrote:

    With this simple example of what happened to me I realized once more that the documentation for python in Cinema4D is still very sparcely arranged, lacking a lot of stuff and not very clean in general :-(
    One has to do lots of questions, lots of digging in and a whole lot of trial&error; attempts to get even the simplest results :-(

    Rui Batista



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 26/05/2011 at 05:30, xxxxxxxx wrote:

    I donÄt understand what you want to do with type != 18.. ?!
    The GetMessageID function works fine for me. It returns the pressed GUI Element's ID, i.e. a button's id.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 26/05/2011 at 07:21, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Your ID is not wokring because of the missing prefix. ;)

    c4d.CLICK_ME

    Son of a @#@$#@$#@#@!!!.
    I swear to God. That frakin' c4d. prefix is out to get me. 😂
    I thought I had finally squashed that prefix demon...Guess not.

    Instead of going round and round. And telling us it works for you in two threads nux.
    Why not take that plugin example I posted. And add the button code to it and show us?
    You have my permission to do that.

    -ScottA



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 26/05/2011 at 08:13, xxxxxxxx wrote:

    And where is the GetMessageID information?
    I typed it in the search field of the python documentation and nothing appeared :-(



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 26/05/2011 at 10:52, xxxxxxxx wrote:

    @Rui:
    The function is self-made. ;)

    Originally posted by xxxxxxxx

    Hm I could now look it up and i used this:

    def GetMessageID(data) :  
      try:  
          return data["id"][0].id  
      except:  
          return None
    

    cheers

    @Scott:
    So it's still not working for you ? (my english is too bad -.-)
    I will tomorrow post you an absolutely fully working example !



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 26/05/2011 at 12:38, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    So it's still not working for you ? (my english is too bad -.-)
    I will tomorrow post you an absolutely fully working example !

    Yes. Using the .c4d prefix works. 👍
    I was just yelling at myself for making such a stupid mistake. That I thought I had stopped myself from making anymore.

    Please do post a working example with your button code in it.
    Feel free to use the plugin I posted.  Or one of your own if you prefer.
    Whatever is easier.

    -ScottA



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 26/05/2011 at 14:36, xxxxxxxx wrote:

    I changed my plug-in tag to use the GetMessageID(data) function and the id names.
    I guess that the type check for 18 allow the procedure to terminate sooner if no button is being pressed but I also removed that check.
    It is working just fine, now :-)
    Thank you all, once again.

    Rui Batista



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 27/05/2011 at 07:10, xxxxxxxx wrote:

    So, here it is. A fully working example of a TagData Plugin demonstrating the use of descriptions.

    http://www.file-upload.net/download-3462169/PyTag-Example.rar.html

    Cheers,
    Niklas


Log in to reply