Jump to content

Patrick Schmitt

Registered Member
  • Posts

    7
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Patrick Schmitt's Achievements

Rookie

Rookie (2/14)

  • One Year In
  • One Month Later
  • Reacting Well Rare
  • Conversation Starter Rare
  • Week One Done

Recent Badges

0

Reputation

  1. I want to make various userdata elements invisible or visible. I use a Python node in Xpresso. This code works for one case, but when I copy the python node and want to use both at the same time, only the first one works. Anyone know what's causing this and how I can fix it? Thank You! import c4d def main(): if not Object: return if not UserDataIDs: return udc = Object.GetUserDataContainer() for descID, container in udc: if descID.GetDepth() < 2: continue if container[c4d.DESC_HIDE]: container[c4d.DESC_HIDE] = False for n in UserDataIDs.split(','): try: if descID[1].id == int(n): container[c4d.DESC_HIDE] = not Flag break except ValueError: pass Object.SetUserDataContainer(descID,container)
  2. I have the following problem. I have a user data tag in which I can select a link (a material should be selected here). Now I would like to use a Python note to query whether a link (to a material) was selected here or whether the field is empty. If so, then this link should be passed on to a material tag. If not, then other material should be passed on. Does anyone know a solution? Maybe my idea with the Python node is also too cumbersome and there is another solution? Thank you for your feedback.
  3. @jedi think it is only for the CallCommand, but maybe there is another way to make an object editable by python without using a script.
  4. @jedOh I did not know that. i found out that the python node in xpresso cant change the scene only. so i think i will use an Python Generator with a link in the user date. import c4d def main(): obj1 = op[c4d.ID_USERDATA, 1] so now i have an User data field were i can put my object in, but i do not know how to make it editable in the next step. anyone have an idea how i can do that?
  5. Hello, I can't find a solution for the following problem. I want to use a python node in xpresso to make selected objects editable. The objects should be loaded into the python node via an input port. This is my code, but it doesn't work. (I'm not a programmer so this may be total bullshit or something is ridiculously wrong, sorry for that :D) import c4d def main(): obj = Input1 c4d.CallCommand(12236) # Make Editable c4d.EventAdd() Does anyone know what I would need to change, or if it's totally wrong how it would go? Thank you 🙂
  6. Hi, I would like to gray out some userdata when a condition is met. I couldn't find anything about this, maybe something like this isn't intended. maybe someone has a solution for this or knows that it won't work. Thanks for your help.
  7. I have the same problem. I'm also looking for a way to make something disappear in OM using Python. Unfortunately the link no longer works. Does anyone have a solution?
×
×
  • Create New...

Copyright Core 4D © 2023 Powered by Invision Community