Jump to content

Marissa Farrell

Marionette Maven
  • Posts

    1,474
  • Joined

  • Last visited

Posts posted by Marissa Farrell

  1. @Jan verhoeven

    I've attached an example of creating multiple rectangles of different lengths.

    It would be helpful to also know what you would like to do with these rectangles after.

     

    The lengths can be defined however you'd like. In my example, I created a list of lengths with an equal step between them. It is also possible to just attach many dimensions to the "width" port of the rectangle.

     

    At the end, I moved the rectangles to show them individually.

     

    To use these rectangles outside of the Marionette network, select the resulting group and "ungroup" it. The rectangles will then be independent of the Marionette network. You can also further manipulate the rectangles with Marionette if you would like.

    mulRects.vwx

  2. Depending on how many nodes make up your Marionette objects, it can increase the file size, which could also impact performance.

     

    There are a few ways to get past this, though.

     

    1) If you aren't concerned about changing the objects any further, you can "ungroup" them from the contained Marionette network. This should reduce the file size, however the objects will no longer be parametric/editable. This is only suggested if you're certain you will not be making any further changes to the Marionette objects.

     

    2) If you have many Marionette objects that contain the same script, but may have different parameters defined, you can actually store the script as a symbol within your Marionette object. This should reduce the overall number of nodes in your file which will reduce the overall file size. The objects themselves will still be independent of each other - you could have the same script defining a cabinet, but also have the ability to make all of the cabinets defined by this script have different dimensions. If you're interested in learning more about this, please let me know.

     

    3) The most unlikely thing you would like to do, though you can do it, is to store the Marionette object itself as a symbol. This functionality has been a little slippery lately, at least when inserting the symbols, but it is still a potential solution.

     

    A note on Marionette objects in general: Once they are generated, they do not usually slow down any processes, however any time you make a change to a parameter, the entire contained script will run again, which depending on the complexity of the object could take some time.

  3. With the current Marionette content, this is very hard/probably impossible to achieve.


    There were some changes made for texturing parts in plug-ins, however I haven't had the time to create a proper demonstration of how to do this yet, but those same changes will work on Marionette objects as well. (They will allow you to map textures to the individual parts of your plug-in object, very exciting!)

     

    As soon as I get a working understanding of what the process is and create a tutorial, I will report back here!

  4. @Patrick Winkler, there's a workaround that can keep the object attached to the network.

     

    The only issue I'm running into now is returning the object to pass out of the output port.

     

    @RuudB, let me know if this helps at all. Right now, you just won't be able to manipulate the object after it's composed, until I can figure out how to find it... :) 

    MarionetteCompose_WIP_MFarrell_v2016.vwx

  5. Here's the Marionette script.

    Currently, if you name the poly you want to divide up 'test' and run the script, it will cut it up into as many segments as the 'int' node specifies in the Object Info Palette  equally by length.

    In order to use the resulting poly, you can just ungroup the result object to detach it from the Marionette network.

     

    Also, if you want your result to be a NURBS curve at the end, you can simply add a 'Convert to NURBS' node to the result of the Polygon 3D node. (I recommend unchecking the "Keep Original Object" checkbox in the Object Info Palette with the 'Convert to NURBS' node selected, just to keep your drawing clean.)

     

    MarionetteDivideCurve_MFarrell.vwx

    • Like 4
  6. 1 hour ago, har said:

    Say I generate a list using the GetFilesInFolder function - to find all jpg image files in a specific directory - and then pass that on to a popup that should also work. Or wont it?

     

    In my experience, it could work, but likely not how you would want.

     

    Unfortunately at this moment, OIP controls don't have the capability to dynamically update, so your list may not always be up to date. 

     

    I think, although I'm not sure if it works every time, that if you modify your node script in some way any time you add/delete jpgs from your referenced directory that it may update to reflect those changes, although it's not documented to absolutely work. 

     

    I'd be happy to go over the limitations and why it cannot do this the way that we all would need it to, if you'd like, and if you do end up giving it a try, please report back on your attempts. It's useful to see how users are trying to use Marionette and where it is lacking. Definitely helps when I go back to report enhancement requests to the backend stuff where I don't get to play around much!

  7. 5 hours ago, har said:

    And while I'm at it, someone could help me clean up my code:

    
    ....
    type = Marionette.OIPControl( 'Panel Type', Marionette.WidgetType.Popup, 0, ['Blank','Vented','Security','Clamp'] )
    ....
    type = self.Params.type.value #This only returns an Index value of the selected Popup Option

    Is there any way to directly access the selected value, rather than only its index?

     

     

    For the nodes I'm doing, it doesn't make a huge difference. But it is kind of unnerving...

     

    Here's an example - if you define the list outside of your OIP control in the Params class, you can extract the information from it in the RunNode definition later.

    Let me know if it's unclear, I can go into further detail if you'd like.

    @Marionette.NodeDefinition
    class Params(metaclass = Marionette.OrderedClass):
    	this = Marionette.Node( "ReturnNameInsteadOfIndex" ) 
    	this.SetDescription('')
    	list = ['Add', 'Subtract', 'Intersect']
    	op = Marionette.OIPControl( 'operation', Marionette.WidgetType.Popup, 0, list)
    	op.SetDescription('')
    	out = Marionette.PortOut()
    	out.SetDescription('')
    	
    
    def RunNode(self):
    	self.Params.out.value = self.Params.list[self.Params.op.value]
  8. @har

    I'll have to inquire about this. I'm seeing this both with the green symbol you've created as well as if I were to make a red symbol.

    I think it MAY have to do with a naming conflict somewhere.

     

    The best advice I can offer you for now would be to duplicate your Marionette Object on the drawing area rather than trying to always insert it from the RM, at least that could help to alleviate the extra clicks you're having to do with your current process...

    I'll report back if I learn anything!

  9.  

    Just now, Tom Klaber said:

    They do not even work in 2D predictably.  I took a Revit course and was impressed by their constraint system - I requested on of our own - and was pointed to these tools.  At first I was happy but right away in my testing, I found these should NOT be used except for the simplest of circumstances.  I found that these constraints would resize and move objects in strange ways.

    VW needs to start thinking about a 3D update to these.  I always hate saying this -but Revit has a nice constraint system and it would be a good model to use when thinking about the types of predictable functionality we need. 

    I've never worked with Revit directly, but I was always a big fan of the constraints in Inventor, which I'm sure is similar enough. I've mentioned it here before, but my voice isn't nearly as big as our users, so the best I can do is back all of you up and share my knowledge of how they work elsewhere.

×
×
  • Create New...