Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
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
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
On 19/12/2017 at 08:01, xxxxxxxx wrote:
Hi Merkvilson, thanks for writing us.
The reason behind this lack of desired functionality is due to the fact that objects presenting a hierarchical structure (like figure, motext or voronois) can't be directly used in the send modelling command. You actually should traverse your object hierarchy and pass to the extrude command the cache representation of the model itself.
Best, Riccardo