• 0 Votes
    2 Posts
    631 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
    857 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
    783 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
    994 Views
    merkvilsonM
    @mikeudin We all have to learn C++
  • Bug: Constantly updating coordinates

    python
    2
    0 Votes
    2 Posts
    545 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
    775 Views
    B
    Ok, thanks Riccardo! I'll register them at the start then.
  • Prevent Editable Command

    python
    2
    0 Votes
    2 Posts
    573 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
    867 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
    669 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
  • Changing hierarchy draw order / priority

    c++ r20
    4
    0 Votes
    4 Posts
    808 Views
    M
    Hi @rsodre, thanks for your feedback, and glad you solved your issue. Regarding the DisplayControl I let you read this topic: SceneHook and DisplayControl. Manuals, for scenehooks is definitely something we consider. Cheers, Maxime.
  • Issues using GL Vertex Buffers

    r20 c++
    5
    1
    0 Votes
    5 Posts
    2k Views
    a_blockA
    Hi Roger, I'm glad you were able to identify the issue and made some progress. And thanks for taking the time to share your findings with the forum. Much appreciated! Cheers, Andreas
  • Compatibility between R20 versions

    c++ windows macos r20
    2
    0 Votes
    2 Posts
    505 Views
    M
    Hi Franck, backward and upward compatibility for the current major release is something we really consider and try our best to not break. Unfortunately, for R20 plugins, they need to be recompiled to make them compatible with R20 SP1. See C++ Index or either in the R20.026 changelog. You may encounter an issue with plugin compiled with R20.011 (see the R20.026 changelog) since you may override maxon dedicated IDs which will break for sure some C4D/plugin stuff. Cheers, Maxime.
  • CUSTOMGUI_TREEVIEW in GetDDescription()

    c++ r20
    4
    0 Votes
    4 Posts
    1k Views
    K
    Sebastian, Added tags. Not really a question but a request. I thought that I had read about people adding a TreeView to the AM using GetDDescription() but maybe it wasn't as well fleshed out as they (or I) suspected. I will look into the custom data type and GUI for it. Please mark as Solved. Thanks! Robert
  • Optimize Collision Detection

    c++ r20 sdk
    4
    0 Votes
    4 Posts
    1k Views
    J
    Hello, Thanks for the responses. I thought that this might be the case and just wanted to clarify it before moving forward. John Thomas