Isotropix Forums

layout other software

General Discussion about Isotropix and CG related topics

layout other software

Unread postby dp_mg42 » Mon Sep 20, 2021 9:07 am

hi i have a huge scene and use maya for layout and export abc to clarisse and i want replace asset with highpoly version in clarisse. can anyone help how can do it?
Posts: 17
Joined: Tue Jan 17, 2017 6:08 pm

Re: layout other software

Unread postby aaute » Thu Sep 23, 2021 5:12 pm

You can use this script.
First select the new object it s going to replace the old one and continue your selection with all the objects you want to replace.

python code

sel = ix.selection
count = sel.get_count()

if count > 1:
theNewObject = sel[0]
for i in range(count):
if i > 0:
obj = sel[i]
pos = obj.get_attribute("translate").get_vec3d()
rot = obj.get_attribute("rotate").get_vec3d()
scl = obj.get_attribute("scale").get_vec3d()
newInstance = ix.cmds.CreateInstanceTo(theNewObject, "build://project/scene/context")
newObj = ix.get_item(newInstance[0])
attrP = newObj.get_attribute("translate")
ix.cmds.LocalizeAttributes([attrP.get_full_name()], True)
attrR = newObj.get_attribute("rotate")
ix.cmds.LocalizeAttributes([attrR.get_full_name()], True)
attrS = newObj.get_attribute("scale")
ix.cmds.LocalizeAttributes([attrS.get_full_name()], True)

Technical Artist - Clarisse Specialist
User avatar
Posts: 93
Joined: Mon Nov 02, 2020 11:59 am

Return to General Discussion