Thank you so much!
In the future I'll be more mindful to post in the right category
Posts made by InterfaceGuy
-
RE: Change icon of python script in UI palette
-
Change icon of python script in UI palette
Hello everyone
I'm wondering if it is possible to do the following:
For the work I'm doing I have a growing set of python scripts that when executed generate custom objects setups using c4d base objects and xpresso
I'm able to include these scripts in the UI which allows me to treat them like buttons for regular c4d objects
The only thing that's missing is the ability to change the icon of the script to a png file that's stored alongside it in its designated folder
Is there a simple/tangible way to achieve what I'm looking for?Thanks
-
SplineMask Render Visibility Not Working
Hello,
I think I found a bug with the SplineMask and Sketch and Toon material.
When I apply the material to it, turning its render visibility off doesn't do anything.To replicate:
- create a spline mask with e.g. a rectangle and a circle as children
- apply a sketch and toon shader to it
- try turning off the visibility in renderer
With regular splines, MoSplines etc. it works as expected.
Am I missing something?
If so, help would be appreciated, if not I hope it gets fixed soon.Thanks
-
RE: Access Spline Field Parameters with XPresso
Thank you for the elaborate reply, it worked! (And helped me to better understand the desc id system)
-
Access Spline Field Parameters with XPresso
Hello,
I want to create an xpresso which accesses the offset parameter of a spline field layer in a plain effector. This proves to be more difficult than I thought because, unlike e.g. a linear field, the spline field layer is not a regular object in the hierarchy.
Naively I thought this would work with the general pattern of adding a port to the xpresso node using the description id:
offset_port = gv_node.AddPort(c4d.GV_PORT_INPUT, DESC_ID_OF_PARAMETER )
But I don't know what the description id should be in this case. Or if that is even the right way to go in this situation.
Dragging the parameter into the console returns:
Plain[c4d.FIELDS,11,1011]
Help is appreciated
-
RE: Strange Bug with Correction Deformer and Bounding Box Node
Oh yes that's a much better approach!
I will provide executables from now on, sorry for the trouble
To be honest I was just stuck in an inaccurate frame for how to solve this... thanks for breaking it
-
Strange Bug with Correction Deformer and Bounding Box Node
Hey there,
I am making use of the trick where I put a correction deformer under a generator (extrude object in this case) to make it readable by the bounding box xpresso node
However, for some strange reason it only works when I add the deformer manually to the scene.
Using python to create the object somehow makes it impotent for this method.
Even dragging it out of the hierarchy and back in again, refreshing xpresso etc. doesn't help with the problem.Only creating a new deformer manually seems to do the trick.
Please help me make sense of this and fix it.
Thank you
-
Set IRR settings
Hello,
in this thread it is explained how to set the size of the IRR.
I would also like to set parameters like the resolution.
When dragging the GUI element into the console it says:
Sniper[c4d.IRR_DETAIL]
and when I execute it without the ID I get
>>> Sniper <c4d.BaseList2D object called Sniper/Sniper with ID 430000000 at 4756143680>
How can I get access to this inside a script?
Thank you!
-
RE: How to Manually Build the Cache for a Vector Import Instance?
works like a charm, thank you!
-
How to Manually Build the Cache for a Vector Import Instance?
Hello,
now with the updated Vector Import object in S26 I thought there might be a more elegant way to import an SVG directly to a spline.
But after playing around with it for a bit I am struggling to extract the spline from the setup using python only.Here is my code:
vector_import = c4d.BaseObject(1057899) self.document.InsertObject(vector_import) # set file path file_path = os.path.join(SVG_PATH, self.file_name + ".svg") vector_import[c4d.ART_FILE] = file_path # extract spline from hierarchy vector_import[c4d.ART_SHOW_HIERARCHY] = True c4d.CallButton(vector_import, c4d.ART_RELOAD) c4d.EventAdd() spline = vector_import.GetDown().GetDown().GetDownLast()
The problem seems to be that even after calling the reload button and c4d.EventAdd() which makes the hierarchy containing the spline visible in the GUI, C4D does not recognise that the vector_import object now has children.
Help would be appreciated!
-
RE: c4dpy "sysctl: No such file or directory"
Sorry for the late reply, my issue went away after reinstalling C4D so I forgot about it
Thank you for your feedback
-
Add Field to Effector
Hello,
I want to link an already existing linear field to an effector.
For that I need to provide/update a c4d.FieldList object. But in the SDK I don't understand how to insert objects into the list.help would be greatly appreciated
Cheers,
David -
c4dpy "sysctl: No such file or directory"
Hello,
I am trying to set up pip on my new machine but keep running into this error:
Davids-MBP-2 Maxon Cinema 4D R26 % c4dpy -m get-pip.py sysctl: No such file or directory
My specs:
-
How to import svg in S25 from path
Hello,
I was really delighted to hear that svg import is now supported natively in S25. But the only method I am aware of so far is via drag and drop.
I would like to import an svg file using only its path as input in a python script. Is there a way to do that?
Thank you
-
access predefined variable in another context
Hi,
I am currently playing around with the Python thickness modifier in the Sketch and Toon material. In that context there are a lot of predefined variables like "StrokeLength", "wPnt" and "sNormalisedP".
My goal is to use these variables to generate 3D Splines that match the strokes on screen. In order to achieve this I have to find a way to access especially the three variables stated above OUTSIDE of the thickness modifier context i.e. in a normal python script.
Does anybody have an idea on how to approach this?
-
RE: get length of stroke
Thanks for the reply
@m_magalhaes said in get length of stroke:
I'm not sure to understand, you have one material for each stroke length?
You are right, I didn't consider that I can only set one speed per material which in my case corresponds to one object.
In this case I want to obtain the length of the longest stroke in order to have the drawing process be finished on frame x. Besides that everything stays the same.I found out that it is possible to use python as a modifier for thickness, color and opacity of the strokes. In this context "StrokeLength" is accessible as a predefined variable.
So with that as a starting point the question becomes how to make this variable accessible outside of the modifier context so I can use it in a regular python script.Grateful for any suggestions.
Cheers
-
get length of stroke
Hi,
I am trying to write a script for the sketch material that makes the "pixel" mode in Draw Speed in the Animate tab work similar to the "completion" mode. What I mean by that is that I want to be able just like in the completion mode to keyframe the beginning and end of the drawing process. But the pixel mode only lets me set the start frame and the speed in pixels.
So the goal is to have the script calculate the speed required to make the drawing end at frame x.
The reason for doing this is that if I have objects with multiple different strokes of different lengths, the drawing speed varies significantly which doesn't make for a nice aesthetic in the end.I know there has to be some place in C4D where the length of each stroke is stored in order for the completion mode to work. So the only question is if and how I could access this value in my python script.
Thank you.