THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/09/2010 at 03:35, xxxxxxxx wrote:
Cinema 4D Version: 11.5
Platform: Windows ;
Language(s) : C++ ;
I'd like to have a tree of object which is hidden in the object manager, so that the user will not be able to move or delete it directly, but I don't know how to do. I first wanted the father object to be a null object but it doesn't seem to be possible to hide it in the object manager, so then I tried to make a plugin object with the use of PLUGINFLAG_HIDE in the the function RegisterObjectPlugin() but it doesn't hide the object in the object manager, in fact it seems to me that PLUGINFLAG_HIDE is quite the same as PLUGINFLAG_HIDEPLUGINMENU.
Thank you if you can help me on these topics.
On 27/09/2010 at 08:36, xxxxxxxx wrote:
if you want the object for internal use only, you can abondon to insert it into the document. But then, it won't appear at all.
Hiding an object in the object manager wouldn't mean that the user has no access to it. He can still select it in the editor views.
If you just want to prevent the user to move, scale or rotate the object, you can set the global matrix you want in each execute call. You may extend this feature by other parameters or even points and polys as well - you just have to keep the appropriate data in the memory and restore the object in each execute call. Although I wouldn't recommend this for large and complex objects!
On 27/09/2010 at 09:02, xxxxxxxx wrote:
Thanks for the reply. It is indeed a very large object, and it only appears in the rendering because I have done SetEditorMode(MODE_OFF), so the user can not select it in the editor view but he can still select it with the object manager and move it accidentally, and then at the rendering the object will not appear in the right place. In fact this object is created and edited in a window outside c4d, so I don't want the user to know that it is an object in c4d so I want to hide it in the object manager.
On 27/09/2010 at 10:28, xxxxxxxx wrote:
Unfortunately, there is no way to hide objects in the Object Manager. You can hide plugin tags upon registration by omitting the TAG_VISIBLE flag. Notice that there is no OBJECT_VISIBLE counterpart for plugin objects!
The only way to avoid user edits is probably Klaus' method. For added security, you can obj->MakeTag(Tprotection) to add a Protection tag. This is not fool proof (as the user can simply delete the tag) but it adds a layer of protection against user edits.
On 27/09/2010 at 10:39, xxxxxxxx wrote:
Ok, thank you for the hints. Maybe there is another way (different than creating an "plugin object") to display a big object just for the rendering? I will think about it. Thank you if you have an idea.
On 27/09/2010 at 11:38, xxxxxxxx wrote:
You may keep the object away from the document until you'll get a render message. Then you can insert it. This is just a spontanous idea. Don't know, if that point of time may be too late for modifying the doc.
On 27/09/2010 at 16:43, xxxxxxxx wrote:
Not sure if this can be done via code, but try to add the to a layer and then hide the layer from the Object Manager. I know that layers can be hidden.
On 27/09/2010 at 22:18, xxxxxxxx wrote:
you could also write a videopost plugin that changes the doc before rendering, as mentioned here: https://plugincafe.maxon.net/topic/5136/5120_changing-the-doc-in-videopost&PID;=20921#20921
So the Object is only rendering but will not be visible in the Scene
On 28/09/2010 at 06:06, xxxxxxxx wrote:
Thanks for your ideas, I will try with a hiden layer or a videoPost plugin.
On 30/09/2010 at 03:48, xxxxxxxx wrote:
Since R12 it's possible to hide objects/tags from the Object manager. Just set the NBIT_OHIDE bit.
One thing to note, it's still posible to select objects in the viewport. I am not sure how to prevent this besides assigning it to a layer.