Python Node

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  12 December 2013
Python Node

I'm in the process of making xpresso setup which contains several objects hidden by layers in object manager. It's pretty much done but I want to add boolean switch in user data to select certain objects then remove them from layer and make all editable. I was able to select hidden objects using coffee node by connecting "Object list" node to Input1 port of coffee node containing simple script like "Input1->SetBit(BIT_ACTIVE);" and connecting user data switch to coffee node "enable" port. After enabling user data switch I would have to press "remove from layer" shortcut, then deselected all, select again stuff that are now visible in OM and then make those editable. Unfortunately this workflow would be to complicated to call it optimal.

I know that Python is much more powerful in general, so i think that it should be possible to create simple script in python node to do all this stuff.

Can someone explain me how to construct simple scripts to select objects from "Object list" node and execute some commands on them in order, by pressing user data switch?

Thanks in advance.
  12 December 2013
I tried to find some info about python node online but there is nothing specific about calling commands from xpresso. Is that even possible?
This kind of information would be useful for people who don't know how to write code but want to extend xpresso capabilities.
  12 December 2013
Many, if not all, command operations can not be used from within expressions. Expressions are evaluated at rendertime, at that time changes to the geometry, hierarchy etc. are strictly forbidden.
- -
The views expressed on this post are my personal opinions and do not represent the views of my employer.
  12 December 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 04:04 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.