I figured out my problem.
My solution was to create a new Weight Editor view, select the property
you want, refresh the View and select back your selection.
In case someone need it, here is the script I'm using to open a Vertex
Color Editor.
#Python
from win32com.client import Dispatch as disp
xsi = Application
layout = xsi.Desktop.ActiveLayout
views = layout.Views
#Lock Weight Editor
xsi.SetValue("preferences.weighteditor.selectlock", True, "")
#Create New Weight Editor
WEview = views('VColor')
if not WEview:
WEview = layout.CreateView('Weight Editor', 'VColor')
#Get Selection
sel = xsi.GetValue('selectionlist')
#Gather All VColor Props
VCCol = disp( "XSI.Collection" )
for i in range(sel.Count):
item = sel(i)
itemType = str(item.type)
if itemType.find('SubComponent')!=-1:
obj = item.SubComponent.Parent3DObject
else:
obj = item
samplesCls = obj.ActivePrimitive.Geometry.Clusters.Filter('sample')
for sampleCl in samplesCls:
sampleClprops = sampleCl.Properties
for prop in sampleClprops:
if prop.type == 'vertexcolor':
VCCol.Add(prop)
#Select All Vertex Color Properties
xsi.SelectObj(VCCol)
#Select Back Original Selection
xsi.SelectObj(sel)
#Refresh View
WEview.Refresh()
On Wed, May 11, 2016 at 11:19 PM, Martin Yara <[email protected]> wrote:
> Hi, we are using the Vertex Color info for real time shading in our
> project, so we need to constantly edit the vertex colors, while dealing
> with envelope weights.
>
> I know that I can use the Open Weight Editor from the View menu or the
> Paint Tools panel to open multiple Editors and specify the property with
> the Select Property button. Now I'd like to automatize that, is it possible?
>
> Thanks
>
> Martin
>
------
Softimage Mailing List.
To unsubscribe, send a mail to [email protected] with
"unsubscribe" in the subject, and reply to confirm.