On 15/12/2017 at 19:32, xxxxxxxx wrote:
Hello plugincafe!
This object plugin simply extrudes all polygons from its child but sometimes it does not work properly.
For example, if I attempt to use a figure object or MoText, Voronoi fracture(objects with sub-objects) as a child object, it simply ignores it.
Is it possible to solve this problem?
def GetVirtualObjects(self, op, hh) :
#Check child Object
child = op.GetDown()
if not child: return None#Generate clone
cloneGenerator = op.GetAndCheckHierarchyClone(hh, child, c4d.HIERARCHYCLONEFLAGS_ASPOLY, False)
dirty = cloneGenerator["dirty"]
clone = cloneGenerator["clone"]if not dirty:
return clone#Extrude all polygons
settings = c4d.BaseContainer()
settings[c4d.MDATA_EXTRUDE_OFFSET] = op[10000]
res = c4d.utils.SendModelingCommand(command = c4d.ID_MODELING_EXTRUDE_TOOL,
list = [clone],
mode = c4d.MODELINGCOMMANDMODE_POLYGONSELECTION,
bc = settings,
doc = child.GetDocument())#Subdivide geometry
subDivisionSurface = c4d.BaseObject(c4d.Osds)
clone.InsertUnder(subDivisionSurface)return subDivisionSurface