Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login
    1. Maxon Developers Forum
    2. mfersaoui
    3. Topics
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 45
    • Posts 150
    • Groups 0

    Topics

    • mfersaouiM

      Dynamics Body Tag & GetVirtualObjects

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK python
      3
      1
      0 Votes
      3 Posts
      698 Views
      ferdinandF
      Hello @mfersaoui, Without any further questions, we will regard this topic as solved and flag it accordingly by Monday, September, the 8th. Thank you for your understanding, Ferdinand
    • mfersaouiM

      Placing a custom menu under the File Menu and on specific position

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK python
      4
      1
      0 Votes
      4 Posts
      777 Views
      mfersaouiM
      @mfersaoui Hi, I found the following solution: FileMenu = c4d.BaseContainer() resource = c4d.plugins.GeResource() resource.InitAsGlobal() FileMenu.InsData(c4d.MENURESOURCE_SUBTITLE, resource.LoadString(12587))
    • mfersaouiM

      External dependencies question

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK python
      3
      0 Votes
      3 Posts
      697 Views
      M
      Hi @mfersaoui there is nothing wrong with the way you are doing, but I would like to point out that the sys.path is a global variable shared over the current python environment. Meaning that 3rd party will be able also to import your own module so it's recommended to have an ambiguous name (e.g. if your module1.py is called util.py) people will be able to do import util and this can be really misleading so it's preferred to have a unique name (maybe you can start with a prefix). Finally, the solution offered by @mp5gosu is the cleanest one as it will create a local import space, so your util.py will only be importable by your own pyp file that actually calls the local import so it's so far the cleanest way as you are not "polluting" the global sys.path. But which one is the best, only you can decide according to what you are aiming to produce. Cheers, Maxime.
    • mfersaouiM

      TreeView Menu

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK python
      6
      1
      0 Votes
      6 Posts
      1k Views
      ferdinandF
      Hi, without further feedback, we will consider this thread as solved by Wednesday and flag it accordingly. Cheers, Ferdinand
    • mfersaouiM

      Dynamic HandleInfo.direction

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK python
      6
      1
      0 Votes
      6 Posts
      989 Views
      ferdinandF
      Hello @mfersaoui, without any further questions or replies, we will consider this topic to be solved by Monday and flag it accordingly. Thank you for your understanding, Ferdinand
    • mfersaouiM

      Toggle bitmap button on .res file

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK python
      4
      0 Votes
      4 Posts
      789 Views
      ManuelM
      hi, Group is the key in UI. Simply add a SCALE_H; property for your slider. so for that two columns group, the slider will take all the place minus the button. GROUP { COLUMNS 2; REAL ONEFLOAT { CUSTOMGUI REALSLIDER; SCALE_H;} BITMAPBUTTON BUTTON_ID { SIZE 16; TOGGLE; BUTTON; ICONID1 5160; ICONID2 5159; } } Cheers, Manuel
    • mfersaouiM

      Change the default name of ID_OBJECTPROPERTIES

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK python
      3
      1
      0 Votes
      3 Posts
      622 Views
      mfersaouiM
      @m_magalhaes said in Change the default name of ID_OBJECTPROPERTIES: DEFAULT 1; Thank you much.
    • mfersaouiM

      Best coding practices

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK python
      3
      0 Votes
      3 Posts
      610 Views
      mfersaouiM
      @zipit Thank you much.
    • mfersaouiM

      Colorize plugin object icon

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK python
      4
      0 Votes
      4 Posts
      690 Views
      M
      This functionality only exists since R21, for the previous versions, there is this hack that is very not recommended Plugins in plugin OR icons!!!!!. Cheers, Maxime.
    • mfersaouiM

      Check if the object parameters has been changed

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK python
      6
      0 Votes
      6 Posts
      961 Views
      mfersaouiM
      Hi, Thank you @r_gigante, @zipit for your replies. The problem comes from the GetDDescription funtion because I use some of dynamic parameters on my objects. It is for this reason that op.IsDirty(c4d.DIRTY_DATA) returning True when I Move, Scale, Zoom or Rotate the perspective view.
    • mfersaouiM

      Create a download progress bar in python

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK python
      5
      0 Votes
      5 Posts
      1k Views
      M
      @indexofrefraction and just in case you have this example from CUSTOMGUI_PROGRESSBAR if you want a more minimal script. Cheers, Maxime.
    • mfersaouiM

      Apply a step value in SetHandle function

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK python
      4
      0 Votes
      4 Posts
      560 Views
      mfersaouiM
      @zipit Hi, Thank you.
    • mfersaouiM

      Create a circle with specific area size.

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK python
      3
      0 Votes
      3 Posts
      578 Views
      mfersaouiM
      @PluginStudent Thank you.
    • mfersaouiM

      Dynamic automated handle interface

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK python
      7
      0 Votes
      7 Posts
      1k Views
      ManuelM
      hi, I will mark this thread as solved tomorrow. Cheers, Manuel
    • mfersaouiM

      How to calculate a rectangle corners position depending on her rotation

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK c++ python
      6
      0 Votes
      6 Posts
      1k Views
      mfersaouiM
      @zipit Hi, Thank you so much.
    • mfersaouiM

      Recalculate Plugin Object Cache

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK python
      6
      0 Votes
      6 Posts
      891 Views
      mfersaouiM
      Hi @r_gigante, @zipit, I'm creating something like the following code. I tried to use the GetAndCheckHierarchyClone, this works but the cloner object became to slow to calculate. For this reason I used the following solution: def __init__(self): pass #self.SetOptimizeCache(True) def GetVirtualObjects(self, op, hh): instance = op.GetDown() if instance is None: return c4d.BaseObject(c4d.Onull) dirty = op.CheckCache(hh) or op.IsDirty(c4d.DIRTY_DATA) instance_dirty = instance.IsDirty(c4d.DIRTY_DATA) dirty |= instance_dirty if not dirty: return op.GetCache(hh) cloner = c4d.BaseObject(c4d.Onull) count = 3 n = 0 while n < count: instance.GetCache().GetClone().InsertUnder(cloner) n += 1 cloner.Message(c4d.MSG_UPDATE) return cloner So, by just deactivating the SetOptimizeCache and cloning only the cache of the instance object the cloner object calculate is become to fast. The unique problem now is the cloner object is return the cache of previous modification on the instance object. This is perceptible only with bool parameters. Example: When I check a bool parameter of the instance object, the cloner return the result of the previous state of the bool parameter. but if I mouseover the cloner in the Viewport or I select it object manager this update the cloner object. Thanks
    • mfersaouiM

      Calculate the rounding radius max value of a n-Side object

      Watching Ignoring Scheduled Pinned Locked Moved General Talk c++ sdk
      3
      0 Votes
      3 Posts
      575 Views
      mfersaouiM
      @Cairyn Hi, Thank you. Solution: Float GeIncircle(Int32 n, Float r) { return r * cos(PI / n); } Float max_rrad = GeIncircle(n, r);
    • mfersaouiM

      Formula to calculate cloner radius

      Watching Ignoring Scheduled Pinned Locked Moved General Talk c++ sdk
      3
      1
      0 Votes
      3 Posts
      690 Views
      mfersaouiM
      @r_gigante Hi Riccardo, thank you for your detailed response. That allowed me to find the exact formula. l / (2 * tan((180 / n) * 3.14159 / 180)) Regards, Mustapha
    • mfersaouiM

      Applying a Target Expression tag to a child object of GVO

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK c++ sdk
      10
      0 Votes
      10 Posts
      1k Views
      mfersaouiM
      @m_magalhaes Hello, Thank you so much.
    • mfersaouiM

      Bend Deformer Using C++

      Watching Ignoring Scheduled Pinned Locked Moved Cinema 4D SDK c++ r19 sdk
      18
      2
      0 Votes
      18 Posts
      3k Views
      M
      Yes because I've done it