Hello,
Can you help me to get the result of the shotgun find output. I can see anything in work_item.data.allDataMap or parent_item.data.allDataMap.
Thank you
Shotgun find Output
4604 7 2-
- Clément HECTOR
- Member
- 5 posts
- Joined: Feb. 2015
- Offline
-
- guilhermecasagrandi
- Member
- 275 posts
- Joined: March 2011
- Offline
-
- Clément HECTOR
- Member
- 5 posts
- Joined: Feb. 2015
- Offline
-
- guilhermecasagrandi
- Member
- 275 posts
- Joined: March 2011
- Offline
-
- Clément HECTOR
- Member
- 5 posts
- Joined: Feb. 2015
- Offline
-
- guilhermecasagrandi
- Member
- 275 posts
- Joined: March 2011
- Offline
Yes, inside houdini´s python shell I can. I´ve shotgun running and SG python tab open inside houdini. But I still get error´s saying that Houdini can´t find SG API. As I posted, I pointed out the “PYTHONPATH” environment to the “shotgun_api3” folder. Is that correct? Do I need to add extra folders to the environment?
Got it. Was a problem with the pythonpath. Thanks for the help, and I hope someone can help you too!
Got it. Was a problem with the pythonpath. Thanks for the help, and I hope someone can help you too!
Edited by guilhermecasagrandi - March 26, 2019 11:02:24
-
- BrookeA
- Staff
- 390 posts
- Joined: Aug. 2017
- Offline
Clément HECTOR
Hello,
Can you help me to get the result of the shotgun find output. I can see anything in work_item.data.allDataMap or parent_item.data.allDataMap.
Thank you
The reason that you can't find the output in the data map is that the Shotgun node is attaching the output as result data, which is a separate entity from the attribute data.
If you want to extract the information in the Python Script node and attach the information as attributes, you could do something like this:
entity_types = pdg.resultData(parent_item, "shotgun/find_entity_type", as_list=True)
entity_dicts = pdg.resultData(parent_item, "shotgun/find_entity_dict", as_list=True)
entity_ids = pdg.resultData(parent_item, "shotgun/find_entity_id", as_list=True)
for x in xrange(0, len(entity_ids)):
work_item.data.setInt("entity_ids", int(entity_ids[x]), x)
work_item.data.setString("entity_types", entity_types[x], x)
work_item.data.setString("entity_dicts", entity_dicts[x], x)
This will grab 3 distinct lists of result data from the upstream work item, where each list corresponds to a tag. It then iterates over the number of returned entities, and adds the information as attributes.
-
- Clément HECTOR
- Member
- 5 posts
- Joined: Feb. 2015
- Offline
-
- Quick Links