THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/11/2012 at 08:28, xxxxxxxx wrote:
generator objects have a green hooklet next to the visibility indikator lights in the object manager. (for exapmle array, cloner but also cube or deformer).
I found out that you can activate and deactivate them with:
and read them with
I was surprised to see that you also can set and read this parameters if an object doesnt habe the hooklet (for example a polygonobject)
- is it bad to set the deformmode to False (standard is True) if the object has no hooklet (for example a polygonobject)
and if so:
- is there a easier way do distinguish between them (generator not generator) than to compare it to a list of object types?
thanks a lot
On 08/11/2012 at 11:31, xxxxxxxx wrote:
if(obj->GetInfo( ) & OBJECT_GENERATOR)
// it is a generator...
// it isn't a generator
Note that primitive objects such as the Cube are also generators so the flag is set for such objects. If this matters you will have to test against a range of objects to exclude those you don't want. Or, you can also test for the flag OBJECT_INPUT - any generator which accepts another object as its input will have this set (e.g. the HyperNURBS) but the Cube etc. primitives will not.
On 09/11/2012 at 01:55, xxxxxxxx wrote:
thanks a lot your C++ code is nearly exactly the python code:
if obj.GetInfo() & c4d.OBJECT_GENERATOR:
print "a generator"
print "not a generator"
works perfect as far as I can see