• Save variables during current session (until C4D is closed)

    7
    0 Votes
    7 Posts
    3k Views
    K
    Thank you very much guys! I think that plugin will be better solution then script in this case. Cheers
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • 0 Votes
    3 Posts
    936 Views
    P
    Ok this was defently my fault. It works now. I was using GetVirtualObjects instead of GetContour.
  • Tag GetInfo() help

    4
    0 Votes
    4 Posts
    1k Views
    N
    @m_adam Great info. Thanks Maxime!
  • Python Autocomplete in Script Manger

    python r20
    4
    0 Votes
    4 Posts
    2k Views
    mikeudinM
    @ipython "c4dpy.exe/app is an executable that runs Cinema 4D in Python command-line mode. It is not only an interpreter, it brings extra features for daily Python development with external code editors/IDEs: auto-completion and debugging."
  • 0 Votes
    2 Posts
    670 Views
    r_giganteR
    Hi Pyr, thanks for reaching us. With regard to the issue you reported, it looks like there's something unexpected happening that instead of returning the computed cache, regenerate and returns a new cache. Although it might occur that switching between documents require the generator to recreate the cache, switching between view definitively it's not supposed to happen. Considering that your information doesn't actually help too much in understanding how you're evaluating cache dirtiness nor what changes are you're checking in the vertexmap, could please post fragments of the code or, alternatively, try to reuse your cache dirtiness mechanism on an "simpler" plugin to see if it works reliably? Looking forward further comments, give best. Riccardo
  • Tag not in sync

    r20 python
    5
    0 Votes
    5 Posts
    2k Views
    r_giganteR
    Hi Rage, thanks for reaching us. With regard to the issue mentioned and considering your non-Cinema background, first of all lets settle down a few concepts: UVWTags are just acting as "storage" for the UVW data used on polygonal objects; TextureTags are instead used to create the actual texturing on the on a generic object (whatever it's a polygonal or parametric one) A parametric object can use a texture even without explicit an UVWTag since the TextureTag delivers all the information with regard on how to map a texture to the object. When a parametric object (e.g. cube) is converted into a polygonal one the UVW values which are part of the parametric object gets dumped in the UVWTag that is generated as soon as the conversion ends. That said give a certain object (a polygonal one) the way to go is: def main(): # check that an object is selected if op is None: return # get the active material activeMat = doc.GetActiveMaterial() if activeMat is None: return # instantiate a TextureTag sph50NoTileTextureTag = c4d.TextureTag() if sph50NoTileTextureTag is None: return # set the mapping type sph50NoTileTextureTag[c4d.TEXTURETAG_PROJECTION] = c4d.TEXTURETAG_PROJECTION_SPHERICAL # turn off tiling sph50NoTileTextureTag[c4d.TEXTURETAG_TILE] = False # scale the mapping to 50% on u and v sph50NoTileTextureTag[c4d.TEXTURETAG_LENGTHX] = 0.5 sph50NoTileTextureTag[c4d.TEXTURETAG_LENGTHY] = 0.5 # link to the active material sph50NoTileTextureTag[c4d.TEXTURETAG_MATERIAL] = activeMat # generate the corresponding UVWTag using the mapping settings specific in the TextureTag sph50NoTileUVWTag = c4d.utils.GenerateUVW(op, op.GetMg(), sph50NoTileTextureTag, op.GetMg()) # check for UVWtag being properly created if sph50NoTileUVWTag is None: return # set the name of the tag sph50NoTileUVWTag.SetName('0.5 non-tiled spherical') # add both the UVWTag and the TextureTag if op.GetTag(c4d.Tuvw) is None: op.InsertTag(sph50NoTileUVWTag) if op.GetTag(c4d.Ttexture) is None: op.InsertTag(sph50NoTileTextureTag) # notify Cinema about the changes c4d.EventAdd() Best, Riccardo
  • Catch InputDialog Cancel?

    3
    0 Votes
    3 Posts
    1k Views
    M
    Hi Donovan, unfortunately, there is no change in this regards. The best way is still to check for an empty return value or either creates your own dialog. I've filled a feature request. Cheers, Maxime.
  • FormatStatement and maxon DataTypes...

    r20 c++ windows
    5
    0 Votes
    5 Posts
    1k Views
    M
    Ah, thank you. I didn't take a look at vec.h. Meanwhile, I already wrote a conversion unit to handle all sorts of formatting. Thought, it was possible to modify the intern string conversions somehow. But nevermind, all works pretty well. Cheers, Robert
  • Object Generator Plugin With Dynamic Objects

    python
    3
    0 Votes
    3 Posts
    861 Views
    S
    Hello, GetVirtualObjects() is called when the scene is updated. ExecutePasses() updates the scene. So you want to update the scene while the scene is updated. That's bad. Also, you create a virtual cube and add a tag to that cube. But you do not add the cube to any document. So updating any document would have no effect on that cube. Typically, one does not add a simulation tag to a virtual object. Such a tag is typically added to the generator that create the virtual objects e.g. you add a simulation tag to a MoGraph cloner to animate it virtual child objects. best wishes, Sebastian
  • Change Hair preferences with Python API

    python r20
    3
    0 Votes
    3 Posts
    1k Views
    merkvilsonM
    @mikeudin We all have to learn C++
  • Bug: Constantly updating coordinates

    python
    2
    0 Votes
    2 Posts
    598 Views
    M
    Hi @merkvilson, Actually, the issue came from inserting the matrix as a child of the cached spline. The cached spline gets a rotation of X then you apply again the rotation of the generator, which make X+X rotation. In order to avoid that, return one null with both object. def GetVirtualObjects(self, op, hh): if not op.GetDown(): return None gch = op.GetAndCheckHierarchyClone(hh, op.GetDown(), c4d.HIERARCHYCLONEFLAGS_ASIS, False) output = gch["clone"] gchDirty = gch["dirty"] if not gchDirty: return output null = c4d.BaseObject(c4d.Onull) indexView = c4d.BaseObject(1018545) output.InsertUnder(null) indexView.InsertUnder(null) indexView[c4d.ID_MG_MOTIONGENERATOR_MODE] = 0 indexView[c4d.MG_OBJECT_LINK] = output return null If you have any questions, please let me know. Cheers, Maxime
  • Time Limit for MSG_DESCRIPTION_CHECKUPDATE

    python
    5
    0 Votes
    5 Posts
    1k Views
    S
    Hello, the message MSG_DESCRIPTION_USERINTERACTION_END has no data. You could store the old value of the parameter in question and check if that value has changed. best wishes, Sebastian
  • Register Plugin during runtime

    python r20 windows
    3
    0 Votes
    3 Posts
    846 Views
    B
    Ok, thanks Riccardo! I'll register them at the start then.
  • Prevent Editable Command

    python
    2
    0 Votes
    2 Posts
    627 Views
    r_giganteR
    Hi merkvilson, thanks for reaching us. With regard to your question, current Cinema 4D API doesn't deliver the desired behavior. Best, Riccardo
  • MSG_UPDATE is sent after pressing button in Material Data

    c++ r20
    3
    0 Votes
    3 Posts
    1k Views
    P
    Hello. Thank you very much for your clarification on this. I have a button in MaterialData that saves the material in a specific format in the disk. I doesn't change anything in the material but the MSG_UPDATE is sent anyway. So, since I don't want to run the MSG_UPDATE handler, I have to set a flag to true in order to skip it. Thank you.
  • Global to Local pos

    python
    9
    0 Votes
    9 Posts
    2k Views
    Passion3DP
    Thank you @mp5gosu This is exactly what I was looking for. In fact, C4D does the calculations itself. I thought I had to do the matrix multiplication, and I didn't understand how to do it. Finally it's very simple
  • Bitmap Button

    python
    14
    1
    0 Votes
    14 Posts
    3k Views
    merkvilsonM
    This goes off topic so I'll make a new post. The main issue is already solved, thanks to Sebastian!
  • Enable/Disable drop down (LONG) elements

    r20 c++ sdk
    3
    0 Votes
    3 Posts
    720 Views
    O
    Hi @a_block Thank you for your answer.
  • Setting window

    python
    7
    0 Votes
    7 Posts
    2k Views
    Passion3DP
    Thanks @Andreas I watched Py-LiquidPainter, but I did not really understand That said, for the parameters, I understood how to do