Notifications
Clear all
[Closed] Get all modifier properties?
Jun 15, 2022 10:50 pm
Hello! I’m new to scripting, so would appreciate some help!
I’m trying to create a script that lists all the modifiers from a selection of objects and also the modifier’s properties.
This is what I have at the moment:
For i in 1 to $selection.count do
(
print $selection[i].name
show $selection[i].modifiers
)
Which returns the following:
"Box001"
No Info Found on: #modifiers(FFD 2x2x2:FFD 2x2x2, BendMod:Bend)
"Sphere001"
No Info Found on: #modifiers(TurboSmooth:TurboSmooth)
However, if I do the following
show $.bend
I do get the list of properties, however this isn’t ideal as it means I’d have to write out each modifiers name – Any ideas?
1 Reply
Jun 15, 2022 10:50 pm
Serejah progressed this further
” .modifiers is a collection so you have to iterate over it to use with show function”
(
print obj.name
for m in obj.modifiers do show m
)
Results:
"Box001"
.dispLattice (Lattice) : boolean
.dispSource (Source_Volume) : boolean
.deformType : integer
.inPoints (Inside_Points) : boolean
.outPoints (Outside_Points) : boolean
.offset : float
.Lattice_Transform : transform
.BendAngle (Angle) : float
.BendDir (Direction) : float
.BendAxis (Axis) : integer
.FromTo (Limit) : boolean
.BendFrom (LowerLimit) : float
.BendTo (UpperLimit) : float
.Center : point3
.Gizmo : transform
"Sphere001"
.iterations : integer
.useRenderIterations (Use_Render_Iterations) : boolean
.renderIterations (Render_Iterations) : integer
.isolineDisplay (Isoline_Display) : boolean
.explicitNormals (Explicit_Normals) : boolean
.smoothResult (Smooth_Output) : boolean
.sepByMats (Separate_By_Materials) : boolean
.sepBySmGroups (Separate_By_Smoothing_Group) : boolean
.update (Update_Options) : index
OK