Hm, interesting, It works now,
either you did something or the solution is to post a comment to trigger it. Anyway Thanks.
Cheers mogh
Hm, interesting, It works now,
either you did something or the solution is to post a comment to trigger it. Anyway Thanks.
Cheers mogh
I still have the same problem. "No push" no "unread toppics". Clearing my Browser Chache does nothing.
any idea ?
cheers mogh
I use this to Thank You Ferdinand.
This is how I imagine an SDK example should look like .... a simplest version , an altered simple version and a complex touching the boundaries of the subject.
I am thankful and praise your work .... !
cheers mogh
Ok Understood,
Ok I guess that explains my "nice" comb from the cache and my jagged flip/flop . sometimes zero comb from the "full" matrix normal ...
I also have different tangents from manually "calculating" them then v3, v2. But I will make a "sanity" check this weekend (feed manual matrixes into my code instead of spline "point" matrixes), before I post about this.
Thanks Ferdinand
I'll divide and conquer away.
@ferdinand
Thank you for your answer, exactly what i need, I am trying to incorporate the additional data but get weird results.
Is there a switch up /typo in the above code I get m.v3 <-> m.v1 ? meaning v1 is the normal ?
Is there a page in the SDK besides the "Matrix" one that explains the additional values and their features ?
Thank you for your Time.
mogh
Ok I guess I have been vague what my issue is.
from the above helper I only get the points the spline is set to (eg. adaptive 5°) but I perhaps want more points in between. That of course only makes sense in certain scenarios but even though if the spline is a straight line there must be a solution to get points in between.
Example different adaptive degree values and the resulting points displayed as lines on the spline - Spline is a copy so no altering of the gizmos.
sorry to be so basic
mogh
How to receive the high definition version / Interpolation of a spline even when the user has set it to "low" detail?
How high definition can I get ? is there more than the user Interface of C4D offers ?
E.g. Interpolation adaptive, angle 0.0
Or am I using c4d.utils.SplineHelp() wrong and there is a another helper that gives me requested amount of points from a spline?
helper = c4d.utils.SplineHelp()
if not helper.InitSplineWith(spline, c4d.SPLINEHELPFLAGS_RETAINLINEOBJECT):
raise RuntimeError("Could not initialize spline helper.")
line = helper.GetLineObject()
points = line.GetAllPoints()
cheers
mogh
How to add a GUI to a TagData Plugin without *.res files ?
... I am on the fence with these
Hope this is basic an clear enough for no further explanation.
cheers
mogh
not bad for 5 hours of dabbling --- thanks to you @ferdinand
Gotcha's:
The Curvature was 90dgree rotated - LLM to the rescue ...
# c4d.plugins.RegisterTagPlugin( ....
# That one nearly got me ;-)
# c4d.TAG_IMPLEMENTS_DRAW_FUNCTION # R22
cheers
Thanks @ferdinand for your considered reply,
At this stage because I just want to "make stuff" I will start as a tool and perhaps learn / have an idea to transfer it to something more useful.
The obvious simple minded question - why is a tag Plugin not enough can a tag not draw into viewport ? Or only not via Python?
Thanks
mogh
Dear Developers,
I am starting to build a new Plugin, which should in the end, draw Curvature Combs / plots onto the selected edges / splines, preferable real time on editing the splines/models.
My question is which Plugintype would be best suited ?
Thinking out loud:
I was thinking a Tag Plugin but It could be to restricted as per the Tag plugin has some programing limits as I understand. Command or Tool plugin could work but I fear it will be clunky from a user experience.
At best a Polygon model with Hypernurbs applied should display several combs at the same time using the Hypernurbs Subdivision for more "accuracy" than a pure Polygon edge.
The plugin probably needs a Link Box to "receive" a selection. I am thinking of Ferdinands Dynamyc Link Example would be cool to have more than on comb active but only one "Tag / Plugin / ...." per object ...
Closest thing C4D has is measure and construct Tool.
As a starting point I would start to display Combs on Splines ...
So to Pick the hive mind - > What Plugin Type is best suited for stuff like this?
Moderators: feel free to move this Topic if aplicable.
Cheers
mogh
Thats it !
Thank you @spedler
No the SDK Example has no
res (Optional[c4d.plugins.GeResource]) – The optional resource.
for RegisterTagPlugin ...
c4d.plugins.RegisterTagPlugin(id=PLUGIN_ID,
str="Py - LookAtCamera",
info=c4d.TAG_EXPRESSION | c4d.TAG_VISIBLE,
g=LookAtCamera,
description="Tpylookatcamera",
icon=bmp)
@spedler Thank you for your time you put into this,
I managed to get the "original" running with a different ID Name after deleting (.../prefs/symbolcache )
My own copy with Filename, NAME, CONTAINER, STRINGTABLE, ID Name still bugs out.
I am probably blind
mogh
enum
{
// End of symbol definition
_DUMMY_ELEMENT_
};
#ifndef _curvaturetools_H_
#define _curvaturetools_H_
enum
{
CTBOOL = 2001
};
#endif
CONTAINER curvaturetools
{
NAME curvaturetools;
INCLUDE Texpression;
GROUP ID_TAGPROPERTIES
{
BOOL CTBOOL { };
}
}
STRINGTABLE curvaturetools
{
curvaturetools "Py - Look At Camera";
CTBOOL "Change Pitch Rotation";
}
Thank you for the reply,
Just as a sanity check I also tried removing a character
PYLOOKATCAMERA_PITCH_A -> error
PYLOOKATCAMERA_PITCH -> works
PYLOOKATCAMERA_PITC -> error
Res, Str, H Files
enum
{
// End of symbol definition
_DUMMY_ELEMENT_
};
CONTAINER Tpylookatcamera
{
NAME Tpylookatcamera;
INCLUDE Texpression;
GROUP ID_TAGPROPERTIES
{
BOOL PYLOOKATCAMERA_PITCH_A { };
}
}
STRINGTABLE Tpylookatcamera
{
Tpylookatcamera "Py - Look At Camera";
PYLOOKATCAMERA_PITCH_A "Change Pitch Rotation";
}
#ifndef _Tpylookatcamera_H_
#define _Tpylookatcamera_H_
enum
{
PYLOOKATCAMERA_PITCH_A = 1000
};
#endif
snippet:
self.InitAttr(node, bool, c4d.PYLOOKATCAMERA_PITCH_A)
node[c4d.PYLOOKATCAMERA_PITCH_A] = True
Error:
AttributeError: 'module' object has no attribute 'PYLOOKATCAMERA_PITCH_A'
Dear Developers,
does anybody know what res files need to be (on Win 11, vs-Code)
I was banging my head on the res files of my copied Tpylookatcamera (SDK Tag Plugin example R13) Python plugin and could not figure out why my copied version does not find the variable IDs but the "original" could.
After several days editing my version I tried to edit the original Version (just a different name string for testing) an boom it also stopped working.
So as far as i understand the res files seem to have a different encoding, line ending , ... or whatever vs-code does to the files ?
Any idea or am I on the wrong track?
I am learning to code on R20 but coding for R2025 so shame on me it might also be a R20 thing but its odd anyway.
Thank you
cheers
Thank You Ferdinand,
This Problem is not mission critical here, but it kept coming at me (at night). Anyway this is hopefully useful for others in some way, as its to complex for very little gain in my case ... I can fake a similar material with Fresnel colors and some falloff / or even thin film hacks.
If anybody wonders, the Scan (gradient) is from an X-Rite Material Scanner (TAC) which normally has a proprietary file format.
Thank you for your time regardless.
mogh
Thank you Ferdinand for your guidance.
Redshift sent me here, Adrian said its not possible with OSL because of closure ... https://redshift.maxon.net/topic/51827/how-to-create-a-tabulated-brdf-color-osl-shader?_=1730097777842
But it seems you made something. I am not sure how to "lookup" the color value in my texture but it seems possible.
OSL MatCap Shader does this in a Spherical manner anyway ...
Thanks.