GetVirtualObjects - BaseObj to PointObj

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 19/10/2012 at 17:44, xxxxxxxx wrote:

Hey Guys,

I creating a ObjectData-Plugin. Why is this not working?

    def GetVirtualObjects(self, op, hierarchyhelp) :  
        
      spline = c4d.BaseObject(c4d.Osplinerectangle);  
      w = c4d.utils.SendModelingCommand(command = c4d.MCOMMAND_MAKEEDITABLE, list = [spline])  
      print(w)  
        
      return spline

I get False back... :(

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 20/10/2012 at 04:00, xxxxxxxx wrote:

I use now:

  
spline = op.GetAndCheckHierarchyClone(hh, spline, c4d.HIERARCHYCLONEFLAGS_ASLINE, False)["clone"]

And this is not working. I cannot set XRAY in virtual objects... :(

    def GetVirtualObjects(self, op, hh) :  
  
      cube = c4d.BaseObject(c4d.Ocube)  
      cube[c4d.ID_BASEOBJECT_XRAY] = 1  
        
      return cube  

And is it possible to change the String/Name (Dialog?) of an description-element if I use the res folder-system?

Help me please!

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 20/10/2012 at 11:22, xxxxxxxx wrote:

I imagine using CSTO might be better as you'll return
an object based on a copy.
Make Editable "kills" the source and thus are prone to
not be alive.

The xray issue I can't tell, but I guess that can only
be set to the actuall result, that is the Generator itself.

Cheers
Lennart

  
import c4d   
from c4d import utils as u   
  
def main() :   
    spline = c4d.BaseObject(c4d.Osplinerectangle)   
    w = u.SendModelingCommand(command = c4d.MCOMMAND_CURRENTSTATETOOBJECT,   
                            list = [spline],   
                            doc = op.GetDocument())   
                               
    return w[0]

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 20/10/2012 at 16:08, xxxxxxxx wrote:

Hey Lennart,

Thank you for your replay.

The xray problem is very bitter. Why does editor/render on/off working but not this. :(

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 23/10/2012 at 00:38, xxxxxxxx wrote:

Did you try setting the Xray option on "op" instead of on your virtual object?